<template>
  <el-row class="box" type="flex" justify="space-between">
    <el-col>
      <div v-if="showBefore">
        <!-- 定义前面得插槽 -->
        <slot name="before" />
      </div>
    </el-col>
    <el-col>
      <el-row class="search">
        <!-- 定义后面的插槽 -->
        <slot name="after" />
      </el-row>
    </el-col>
  </el-row>
</template>

<script>
export default {
  props: {
    showBefore: {
      type: Boolean,
      default: false
    }
  }
}
</script>

<style lang="scss" scoped>
.box{
  border-bottom: 1px solid #ddd;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.search {
    display: flex;
    justify-content: space-between;
    .el-button{
      background: #f7f6f9;
    }
}
</style>
